# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Anton Bazhenov <anton.bazhenov at gmail>
# Contributor: JD Steffen <jd at steffennet dot org>

pkgname=simutrans-pak64
pkgver=123.0
pkgrel=1
pkgdesc="Low resolution graphics set for Simutrans"
arch=('any')
url="https://www.simutrans.com/"
license=('custom:Artistic')
options=('!strip')
source=(https://downloads.sourceforge.net/simutrans/simupak64-${pkgver/./-}.zip
        licence.txt)
sha256sums=('b8a0a37c682d8f62a3b715c24c49bc738f91d6e1e4600a180bb4d2e9f85b86c1'
            'dbf7da494c0381290c7af4dfe0a24415c666641a237b401ecb2be6cd7180e183')

package() {
  chmod -R 644 simutrans

  #data
  mkdir -p "$pkgdir/usr/share/games/simutrans"
  cp -r simutrans/pak "$pkgdir/usr/share/games/simutrans"

  find "$pkgdir" -type f -exec chmod 644 {} \;
  find "$pkgdir" -type d -exec chmod 755 {} \;

  #license
  install -Dm644 licence.txt "$pkgdir/usr/share/licenses/simutrans-pak64/licence.txt"
}
